import request from '/@/utils/request';

import qs from 'qs'

const addressAccountService = "SCYBER-SERVICE";


export function flashSwapApi() {
	return {
		/**
		 * 查询兑换交易队
		 */
		swapPairList: (params: any, commonParams: any) => {
			return request({
				url: `${addressAccountService}/flash/swap/pair/admin`,
				params: Object.assign({}, params, commonParams),
				method: 'get'
			});
		},

		/**
		 * 创建兑换交易队
		 */
		swapPairCreate: (params: any) => {
			return request({
				url: `${addressAccountService}/flash/swap/pair/admin`,
				data: params,
				method: 'post'
			});
		},

		/**
		 * 更新兑换交易队
		 */
		swapPairUpdate: (params: any) => {
			return request({
				url: `${addressAccountService}/flash/swap/pair/admin`,
				data: params,
				method: 'put'
			});
		},

		/**
 * 更新兑换交易队
 */
		swapPairUpdateStatus: (params: any) => {
			return request({
				url: `${addressAccountService}/flash/swap/pair/admin/status`,
				data: params,
				method: 'put'
			});
		},

		/**
		 * 查询闪兑交易记录
		 */
		swapRecordList: (params: any, commonParams: any) => {
			return request({
				url: `${addressAccountService}/flash/swap/record/admin`,
				params: Object.assign({}, params, commonParams),
				method: 'get'
			});
		},

	};
}
